var productManager = {};

productManager.createProductorA = function(){
	console.log('ProductA')
}

productManager.createProductorB = function(){
	console.log('ProductB')
}

productManager.createProductorC = function(){
	console.log('ProductC')
}

productManager.factory = function(type){
	//方法一
	return new this[type];
	//方法二
	//return new productManager[type];

}

productManager.factory('createProductorB')
productManager.factory('createProductorC')